#include <iostream>
#include <string>

using namespace std;

class person
{
private:
    string name;
private:
    int age;
protected:
    string sex;

public:
    person(string name ,int age ,string sex)
        :name(name) , age(age) , sex(sex)
    {
        cout << "父类有参构造" << endl;
    }
    person()
    {
        name = "未设置姓名";
        age = -1 ;
        sex = "沃尔玛塑料袋";
        cout << "父类无参构造" << endl;
    }
    ~person()
    {
            cout << "我是父类的析构" << endl;
    }
};

class student : private person
{
private:

public:
    int id;
public:
    student(string name ,string sex ,int age ,int id)
        :person(name ,age ,sex),id(id)
    {
        cout <<"子类有参构造" << endl;
    }
    student()
    {
        cout << "子类无参构造" << endl;
    }
    ~student()
    {
        cout<< "我是子类的析构" << endl;
    }
public:
    void show_data()
    {

    }

};

class son : private student
{
private:
  
public:
    son()
    {
        student::id = 10;
    }
    ~son()
    {

    }
};





int main(int argc, char const *argv[])
{
    son s;

    while (1)
    {
        /* code */
    }
    
    
    
    return 0;
}
